1. Field of the Invention
This invention relates to a comparator circuit and more particularly to a comparator used as a pulse width modulator (PWM). In such applications, a periodic waveform such as a ramp or triangular voltage is compared to an analog input voltage. The width of the output pulse generated during each period of the repetitive waveform is proportional to the value of the analog input signal. The digital pulse width is defined by that portion of the repetitive waveform which is less than (or greater than) the analog voltage, with output switching occurring when the ramp or triangle wave crosses the level of the analog voltage. The present invention is directed to a comparator which includes latching circuitry to eliminate multiple pulsing or output jitter caused by noise, oscillation, or threshold ambiguity at or near the point where the repetitive waveform crosses the analog voltage level.
2. Description of the Prior Art
Heretofore, two different ways of eliminating the multiple pulsing problems in pulse width modulators have been employed. The first method is to add low pass filters to either or both inputs to the comparator. This approach suffers by severely limiting the dynamic response of the system.
The second approach is to connect the comparator output to a flip-flop which changes state with the first output transition of the comparator and thereby ignores any further switching of the comparator. The flip-flop is reset with a clock pulse at the completion of each period of the repetitive waveform, allowing the cycle to repeat with the next period. This method is effective but suffers from the added complexity of the required flip-flop.
Several patents disclose pulse width modulators which utilize some type of feedback arrangement. U.S. Pat. No. 3,866,146 to Van Mourik discloses a pulse width modulator which essentially comprises an integrator having its output connected to one input of a differential amplifier. A first input voltage is connected to the input of the integrator and a second input voltage is connected to the other input of the differential amplifier. The output of the circuit is a pulse having a pulse width proportional to the quotient of the two inputs. When the output voltage changes, a feedback circuit causes a pulse to be generated which discharges the integrator in order to reset the modulator. In addition, feedback is utilized to stabilize the output of the modulator while the integrator is being discharged. Although the modulator disclosed in Van Mourik shows the use of feedback to provide stabilization, the circuit has slow dynamic response due to the use of an integrator and is not designed to function by comparing an unknown analog voltage with a constant frequency ramp or triangular waveform.
Other pulse width modulators employing some type of feedback are shown in U.S. Pat. Nos. 3,277,395 to Grindle et al, 3,393,363 to Forster, Jr. and 3,708,765 to Salamon, et al. However, none of the circuits shown in these patents utilize feedback to provide a latching function. In addition, most feedback circuits have an adverse effect upon the input characteristics of the device.